<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<div class="mainBody" style="overflow: auto;">
    <div class="editBody">
        <?php echo form_open('role/add'); ?>
        <div class="bodyTitle" style="">
            <div class="titleIcon addTitle"></div>
            <p class="titleName fontDinproMedium" style="">ADD ROLE</p>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Role Name:</p>
                <div class="rightContent">
                    <input type="text" class="input-text titleText fontDinpro" id="name" name="name" />
                    <p class="waring fontDinpro">*3-20位用户组标识</p>
                    <?php if(form_error('name')!=''){ ?>
                        <label class="waring fontDinpro autoWidth"><?php echo form_error('name'); ?></label>
                    <?php } ?>
                </div>
            </div>
        </div>
        <div class="bodyDiv fontDinpro">
            <div class="divContent">
                <p class="fontDinproMedium">Allow Roles:</p>
                <?php foreach($rights as $key=>$v): ?>
                    <input class="snapRight" type="checkbox" value="<?php echo $v['id']; ?>" name="right[]">
                    <label class="fontDinpro" style=""><?php echo $v['menu_name']; ?></label><br/>
                <?php endforeach; ?>
            </div>
        </div>
        <button class="btn submitBtn fontDinproBold" href="javascript:void(0)" type='submit'>SUMBIT</button>
        <?php echo form_close(); ?>
    </div>
</div>